#import OPi.GPIO as gpio
import time
import serial

ser = serial.Serial("/dev/ttyS5",9600,timeout=1)
text = "O"
times=0
while True:
    rtext='none'
#     ser.write(text.encode('utf-8'))
    ser.write(165)
#     if ser.inWaiting != 0 :
#     rtext=ser.read(1)
#     ser.flushInput()
#     print(rtext)
    print(times)
    times = times + 1
    time.sleep(0.5)
